<?php
$content = $page->getInnerContent()->content;
?>

<dl>
	<dt>Primary content<dt>
	<dd>
		<textarea rel="scribble-widget" scribblewidget:type="rte" scribblewidget:config="primaryRteConfig" name="inner[contentprimary]"><?php $this->html->e(isset($content->contentprimary) ? $content->contentprimary : ''); ?></textarea>
	</dd>
</dl>

<dl>
	<dt>Secondary content<dt>
	<dt class="aid">Optional. If emtpy, primary content will fill width</dt>
	<dd>
		<textarea rel="scribble-widget" scribblewidget:type="rte" scribblewidget:config="secondaryRteConfig" name="inner[contentsecondary]"><?php $this->html->e(isset($content->contentsecondary) ? $content->contentsecondary : ''); ?></textarea>
	</dd>
</dl>

<!-- Define the RTE configs we've used above -->
<script type="text/javascript">
var primaryRteConfig = {
	mode: 'none',
	height: 350,
	width: 758,
	convert_urls: false,
	relative_urls: false,
	plugins: "fullscreen,table,advimage",
	file_browser_callback: 'mceFileBrowser',
	fullscreen_new_window: true,
	theme: "advanced",
	theme_advanced_toolbar_location: "top",
	theme_advanced_buttons2_add: "separator,visualaid",
	theme_advanced_buttons3_add: "table,tablecontrols,fullscreen",
	content_css: "<?php echo "{$baseUrl}/front-end.css"; ?>",
	body_id: "main"
};

var secondaryRteConfig = {
	mode: 'none',
	height: 350,
	width: 758,
	convert_urls: false,
	relative_urls: false,
	plugins: "fullscreen,table,advimage",
	file_browser_callback: 'mceFileBrowser',
	fullscreen_new_window: true,
	theme: "advanced",
	theme_advanced_toolbar_location: "top",
	theme_advanced_buttons2_add: "separator,visualaid",
	theme_advanced_buttons3_add: "table,tablecontrols,fullscreen",
	content_css: "<?php echo "{$baseUrl}/front-end.css"; ?>",
	body_id: "secondary"
};
</script>